package org.lzy.shop.adapter

import android.content.Context
import android.text.TextUtils
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import org.lzy.shop.R
import org.lzy.shop.response.HomeClassifyTree
import org.lzy.shop.response.OrderResponse
import org.lzy.shop.util.setUrl
import org.lzy.shop.util.setUrlRound


class OrderPicAdapter: BaseQuickAdapter<String, QuickViewHolder>() {

    override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): QuickViewHolder {
        return QuickViewHolder(R.layout.item_order_pic, parent)
    }

    override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: String?) {
        if (!TextUtils.isEmpty(item)) {
            setUrlRound(item,20f,holder.getView(R.id.item_order_pic))
        }
    }
}